# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

inherit eutils

DESCRIPTION="Galago presence daemon."
HOMEPAGE="http://www.galago.info/"
SRC_URI="http://www.galago.info/files/releases/source/${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="threads"

DEPEND=">=dev-libs/libgalago-0.1.0
		>=dev-libs/glib-2.4"

src_compile() {
	econf \
		$(use_enable threads binreloc-threads) \
		|| die
	emake || die
}

src_install() {
	make DESTDIR=${D} install || die

	dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README
}

pkg_postinst() {
	ewarn "In order to use Galago you must have a running D-BUS session."
	ewarn "For example, if you're using GNOME you should add something like:"
	ewarn
	ewarn "    exec dbus-launch --exit-with-session gnome-session"
	ewarn
	ewarn "to your ~/.xinitrc or ~/.xsession file."
}
